package com.trkj.pojos;

import java.io.Serializable;
import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;


/**
 * The persistent class for the DEPRECIATION database table.
 * 
 */
@Entity
@NamedQuery(name="Depreciation.findAll", query="SELECT d FROM Depreciation d")
public class Depreciation implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="DEPRE_ID")
	private String depreId;

	@Column(name="DEPRE_APPLYMAN")
	private String depreApplyman;

	@Column(name="DEPRE_AUDITOR")
	private String depreAuditor;

	@Column(name="DEPRE_DEPT")
	private String depreDept;

	@Column(name="DEPRE_TITLE")
	private String depreTitle;

	@Temporal(TemporalType.DATE)
	@Column(name="DORDER_DATE3")
	private Date dorderDate3;

	@Column(name="DORDER_MONEY3")
	private BigDecimal dorderMoney3;

	//bi-directional many-to-one association to DepreDatail
	@OneToMany(mappedBy="depreciation")
	private List<DepreDatail> depreDatails;

	//bi-directional many-to-one association to DepreOrder
	@OneToMany(mappedBy="depreciation")
	private List<DepreOrder> depreOrders;

	public Depreciation() {
	}

	public String getDepreId() {
		return this.depreId;
	}

	public void setDepreId(String depreId) {
		this.depreId = depreId;
	}

	public String getDepreApplyman() {
		return this.depreApplyman;
	}

	public void setDepreApplyman(String depreApplyman) {
		this.depreApplyman = depreApplyman;
	}

	public String getDepreAuditor() {
		return this.depreAuditor;
	}

	public void setDepreAuditor(String depreAuditor) {
		this.depreAuditor = depreAuditor;
	}

	public String getDepreDept() {
		return this.depreDept;
	}

	public void setDepreDept(String depreDept) {
		this.depreDept = depreDept;
	}

	public String getDepreTitle() {
		return this.depreTitle;
	}

	public void setDepreTitle(String depreTitle) {
		this.depreTitle = depreTitle;
	}

	public Date getDorderDate3() {
		return this.dorderDate3;
	}

	public void setDorderDate3(Date dorderDate3) {
		this.dorderDate3 = dorderDate3;
	}

	public BigDecimal getDorderMoney3() {
		return this.dorderMoney3;
	}

	public void setDorderMoney3(BigDecimal dorderMoney3) {
		this.dorderMoney3 = dorderMoney3;
	}

	public List<DepreDatail> getDepreDatails() {
		return this.depreDatails;
	}

	public void setDepreDatails(List<DepreDatail> depreDatails) {
		this.depreDatails = depreDatails;
	}

	public DepreDatail addDepreDatail(DepreDatail depreDatail) {
		getDepreDatails().add(depreDatail);
		depreDatail.setDepreciation(this);

		return depreDatail;
	}

	public DepreDatail removeDepreDatail(DepreDatail depreDatail) {
		getDepreDatails().remove(depreDatail);
		depreDatail.setDepreciation(null);

		return depreDatail;
	}

	public List<DepreOrder> getDepreOrders() {
		return this.depreOrders;
	}

	public void setDepreOrders(List<DepreOrder> depreOrders) {
		this.depreOrders = depreOrders;
	}

	public DepreOrder addDepreOrder(DepreOrder depreOrder) {
		getDepreOrders().add(depreOrder);
		depreOrder.setDepreciation(this);

		return depreOrder;
	}

	public DepreOrder removeDepreOrder(DepreOrder depreOrder) {
		getDepreOrders().remove(depreOrder);
		depreOrder.setDepreciation(null);

		return depreOrder;
	}

}